<?php
declare(strict_types=1);
namespace SixShop\Payment\Controller;

use SixShop\Payment\Entity\ExtensionPaymentEntity;
use SixShop\Payment\PaymentManager;
use think\Response;
use function SixShop\Core\success_response;

class RecordController
{
    public function read(int $id, ExtensionPaymentEntity $extensionPaymentEntity, PaymentManager $paymentManager): Response
    {
        $entity = $extensionPaymentEntity->read($id);

        $paymentManager->query($entity->pay_type, $entity->id);
        return success_response($entity);
    }
}